package com.grapro.visitorsystem.exception;

import com.grapro.visitorsystem.constant.ResultCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

/**
 * 使用: throw new CustomException(110,"number不能为空，其实是400");
 * */
public class CustomException extends RuntimeException{
    private static final long serialVersionUID = -8400239090334588012L;
    @Getter
    @Setter
    private int code = 15;

    public CustomException(ResultCode permissionTokenExpired){
        super();
    }

    public CustomException(String message){
        super(message);
    }

    public CustomException(int code, String message){
        super(message);
        this.code = code;
    }
}